home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-01 / wmv12s.zip / DTA.H < prev    next >
Text File  |  1993-01-04  |  3KB  |  75 lines

  1. #define A_FIL    0x40  /* Peter's addition: this mask searches for file */
  2. #define A_ARC    0x20  /* attributes bits of attribute byte in dta */
  3. #define A_DIR    0x10
  4. #define A_SYS    0x4
  5. #define A_HID    0x2
  6. #define A_MASK    (A_FIL | A_DIR | A_SYS | A_HID)  /* mask to find all files */
  7.  
  8. struct dtbuf3 {  /* structure returned by dos function 0x4e and 0x4f */
  9.   /* The first 21 bytes are undocumented; use them at your own risk.
  10.   ** Their use is guessed by Peter Wu. This applies only to DOS 3.xx
  11.   */
  12.  
  13.   unsigned char drv_no;      /* drive number; 1=A  2=B    3=C ... */
  14.   char template[11];         /* file template; no period */
  15.   unsigned char match_attr;  /* the search attribute */
  16.   unsigned char slotl;         /* directory slot number of the matching file */
  17.   unsigned char sloth;
  18.   unsigned char clusl, clush; /* cluster number of the directory being
  19.                  searched */
  20.   unsigned char unknown[4];   /* haven't figured out what these are */
  21.   /* end of first 21 bytes */
  22.  
  23.   unsigned char attr;
  24.   unsigned short time;
  25.   unsigned short data;
  26.   unsigned long size;  /* 4 bytes */
  27.   char fn[13];    /* this is an asciiz */
  28.   unsigned char e_attr;  /* extended (by peter) search attribute */
  29. };
  30.  
  31. struct dtbuf2 {  /* structure returned by dos function 0x4e and 0x4f */
  32.   /* The first 21 bytes are undocumented; use them at your own risk.
  33.   ** Their use is guessed by Peter Wu. This applies only to DOS 2.xx
  34.   */
  35.  
  36.   unsigned char match_attr;  /* the search attribute */
  37.   unsigned char drv_no;      /* drive number; 1=A  2=B    3=C ... */
  38.   char template[11];         /* file template; no period */
  39.   unsigned char slotl;         /* directory slot number of the matching file */
  40.   unsigned char sloth;
  41.   unsigned char unknown[4];   /* haven't figured out what these are */
  42.   unsigned char clusl, clush; /* cluster number of the directory being
  43.                  searched */
  44.   /* end of first 21 bytes */
  45.  
  46.   unsigned char attr;
  47.   unsigned short time;
  48.   unsigned short data;
  49.   unsigned long size;  /* 4 bytes */
  50.   char fn[13];    /* this is an asciiz */
  51.   unsigned char e_attr;  /* extended (by peter) search attribute */
  52. };
  53.  
  54. struct dtbufx {  /* generic version (works for any DOS version */
  55.   unsigned char unknown[21];
  56.   unsigned char attr;
  57.   unsigned short time;
  58.   unsigned short data;
  59.   unsigned long size;  /* 4 bytes */
  60.   char fn[13];    /* this is an asciiz */
  61.   unsigned char e_attr;  /* extended (by peter) search attribute */
  62.  
  63.   /* the following info has to be copied from dtbuf2 or dtbuf3 by
  64.   ** the ffmf and fnmf functions
  65.   */
  66.   unsigned char drv_no;
  67.   unsigned char slotl, sloth, clusl, clush;
  68. };
  69.  
  70. union dtbuf {
  71.   struct dtbuf3 dos3;
  72.   struct dtbuf2 dos2;
  73.   struct dtbufx dos;
  74. };
  75.